 /**
 *本地信息存储
 */
var AppStorage = new  (function(){

		/**
		 *存储
		 */
		this.setValue = function(key,value) {

			var expiresDate = new Date();
			//设置过期时间为一个月
				expiresDate.setTime(expiresDate.getTime() + (60 * 60 * 1000) * 24 * 30);

			$.cookie(key, value, {
				expires: expiresDate
			});
		}
		/*
		 *获取值
		 */
		this.getValue = function(key) {
			return $.cookie(key);
		}
		/**
		 *删除值
		 */
		this.removeValue = function(key) {
			$.removeCookie(key);

		}

		///////////==============================Session级别存储 浏览器关闭后 session自动失效========================================//
		this.setValueInSession = function(key,value) {

			sessionStorage.setItem(key,value);
		}

		this.getValueInSession = function(key) {
			return sessionStorage.getItem(key);
		}

		this.removeValueInSession = function(key) {
			sessionStorage.removeItem(key);
		}

		///////////==============================localStorage级别存储 浏览器关闭后 localStorage不失效========================================//
		this.setValueInLocalStorage = function(key,value) {

			if(!localStorage){
				return;
			}
			localStorage.setItem(key,value);

		}
		this.getValueInLocalStorage = function(key) {
			// alert(localStorage);
			// alert(!localStorage);
			if(!localStorage){
				return 1;
			}else{
				return localStorage.getItem(key);
			}

		}
		this.removeValueInLocalStorage = function(key) {
			if(!localStorage){
				return;
			}
			localStorage.removeItem(key);
		}
})()
